package com.monster.datasourcejob.datax.reader.impl;

import com.monster.datasourcejob.datax.reader.Reader;
import com.monster.datasourcejob.model.Field;

import java.util.List;

/**
 * description:
 *
 * @author Yuanml on 2021/6/30 17:55
 */
public class MysqlReader implements Reader {
    @Override
    public String genContent() {
        return null;
    }

    @Override
    public String genFieldList(List<Field> fields) {
        StringBuilder fieldsBuilder = new StringBuilder();
        for (int i = 0; i < fields.size() - 1; i++) {
            fieldsBuilder.append("\"").append(fields.get(i).getName()).append("\",\n");
        }
        fieldsBuilder.append("\"").append(fields.get(fields.size() - 1).getName()).append("\"");

        return fieldsBuilder.toString();
    }


}
